package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.SysLikeRecord;
import org.apache.ibatis.annotations.Param;

/**
 * 点赞记录Mapper接口
 * 
 * @author ruoyi
 * @date 2025-05-02
 */
public interface SysLikeRecordMapper 
{
    /**
     * 查询点赞记录
     * 
     * @param userId 点赞记录主键
     * @return 点赞记录
     */
    public SysLikeRecord selectSysLikeRecordByUserId(Long userId);

    /**
     * 查询点赞记录列表
     * 
     * @param sysLikeRecord 点赞记录
     * @return 点赞记录集合
     */
    public List<SysLikeRecord> selectSysLikeRecordList(SysLikeRecord sysLikeRecord);

    /**
     * 新增点赞记录
     * 
     * @param sysLikeRecord 点赞记录
     * @return 结果
     */
    public int insertSysLikeRecord(SysLikeRecord sysLikeRecord);

    /**
     * 修改点赞记录
     * 
     * @param sysLikeRecord 点赞记录
     * @return 结果
     */
    public int updateSysLikeRecord(SysLikeRecord sysLikeRecord);

    /**
     * 删除点赞记录
     * 
     * @param userId 点赞记录主键
     * @return 结果
     */
    public int deleteSysLikeRecordByUserId(Long userId);

    /**
     * 批量删除点赞记录
     * 
     * @param userIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSysLikeRecordByUserIds(Long[] userIds);

    SysLikeRecord selectSysLikeRecordByUserIdAndTargetId(@Param("userId") Long userId,
                                                         @Param("targetId") Long targetId,
                                                         @Param("type") Integer type);

    int deleteSysLikeRecordByUserIdAndTargetId(@Param("userId") Long userId,
                                               @Param("targetId") Long targetId,
                                               @Param("type") Integer type);

    Integer selectSysLikeRecordByType(Integer type);

    Integer selectSysLikeRecordByTargetIdAndType(@Param("targetId") Long id, @Param("type") Integer type);

}
